home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
tex-k
/
gsftopkk.shar.gz
/
gsftopkk.shar
Wrap
Internet Message Format
|
1995-02-11
|
100KB
From: interran@uluru.Stanford.EDU (John Interrante)
To: kb@cs.umb.edu
Subject: kpathsea 2.52 and gsftopk
Date: Fri, 6 Jan 95 01:42:21 PST
--- Makefile.in.save Wed Jan 4 16:13:31 1995
+++ Makefile.in Thu Jan 5 15:46:54 1995
@@ -2,5 +2,5 @@
# Package subdirectories, the library, and all subdirectories.
-programs = dviljk dvipsk web2c xdvik
+programs = dviljk dvipsk gsftopk web2c xdvik
kpathsea_dir = kpathsea
all_dirs = $(programs) $(kpathsea_dir)
--- configure.in.save Wed Jan 4 09:49:39 1995
+++ configure.in Thu Jan 5 15:37:59 1995
@@ -25,5 +25,5 @@
AC_PROG_INSTALL
-AC_CONFIG_SUBDIRS(kpathsea dviljk dvipsk web2c xdvik)
+AC_CONFIG_SUBDIRS(kpathsea dviljk dvipsk gsftopk web2c xdvik)
AC_OUTPUT(Makefile)
Finally, here're the contents of my gsftopk subdirectory. I've got
dvipsk, gsftpk, web2c, and xdvik all lying together in the same
top-level directory called kpathsea-2.52.
John
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1995-01-06 01:22 PST by <interran@uluru>.
# Source directory was `/home/uluru/src/TeX/kpathsea-2.52'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 1146 -rw-r--r-- gsftopk/Makefile.in
# 694 -rw-r--r-- gsftopk/acconfig.h
# 2526 -rw-r--r-- gsftopk/c-auto.h.in
# 53177 -rwxr-xr-x gsftopk/configure
# 269 -rw-r--r-- gsftopk/configure.in
# 4386 -rw-r--r-- gsftopk/gsftopk.1
# 23315 -rw-r--r-- gsftopk/gsftopk.c
# 5319 -rw-r--r-- gsftopk/render.ps
#
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
shar_touch=touch
else
shar_touch=:
echo
echo 'WARNING: not restoring timestamps. Consider getting and'
echo "installing GNU \`touch', distributed in GNU File Utilities..."
echo
fi
rm -f 1231235999 $$.touch
#
# ============= gsftopk/Makefile.in ==============
if test ! -d 'gsftopk'; then
echo 'x - creating directory gsftopk'
mkdir 'gsftopk'
fi
if test -f 'gsftopk/Makefile.in' && test X"$1" != X"-c"; then
echo 'x - skipping gsftopk/Makefile.in (file already exists)'
else
echo 'x - extracting gsftopk/Makefile.in (text)'
sed 's/^X//' << 'SHAR_EOF' > 'gsftopk/Makefile.in' &&
# Makefile for gsftopkk --kb@cs.umb.edu.
version = 1.7e2
X
ac_include ../make/paths.make
X
# (Optional) The fully-qualified path of Ghostscript.
# GSPATH=-DGS=\"/usr/local/gnu/bin/gs\"
GSPATH=-DGS=\"/usr/local/bin/gs\"
X
# See INSTALL for compilation options.
DEFS = $(GSPATH) $(XDEFS)
X
ac_include ../make/common.make
ac_include ../make/programs.make
X
objects = gsftopk.o
X
program = gsftopk
X
default all: $(program)
X
$(program): $(kpathsea) $(objects)
X $(CC) $(LDFLAGS) -o $@ $(objects) $(LOADLIBES)
X
ac_include ../make/tkpathsea.make
X
install: install-exec install-data
uninstall: uninstall-exec uninstall-data
X
install-exec: $(program)
X $(SHELL) $(top_srcdir)/../mkdirchain $(bindir)
X $(INSTALL_PROGRAM) $(program) $(bindir)/$(program)
uninstall-exec:
X rm -f $(bindir)/$(program)
X
install-data:
X $(SHELL) $(top_srcdir)/../mkdirchain $(mandir) $(psheaderdir)
X $(INSTALL_DATA) $(srcdir)/gsftopk.1 $(mandir)/gsftopk.$(manext)
X $(INSTALL_DATA) $(srcdir)/render.ps $(psheaderdir)/render.ps
uninstall-data:
X rm -f $(mandir)/gsftopk.$(manext)
X rm -f $(psheaderdir)/render.ps
X
ac_include ../make/config.make
X
info dvi check:
X
ac_include ../make/misc.make
SHAR_EOF
$shar_touch -am 0105144695 'gsftopk/Makefile.in' &&
chmod 0644 'gsftopk/Makefile.in' ||
echo 'restore of gsftopk/Makefile.in failed'
shar_count="`wc -c < 'gsftopk/Makefile.in'`"
test 1146 -eq "$shar_count" ||
echo "gsftopk/Makefile.in: original size 1146, current size $shar_count"
fi
# ============= gsftopk/acconfig.h ==============
if test -f 'gsftopk/acconfig.h' && test X"$1" != X"-c"; then
echo 'x - skipping gsftopk/acconfig.h (file already exists)'
else
echo 'x - extracting gsftopk/acconfig.h (text)'
sed 's/^X//' << 'SHAR_EOF' > 'gsftopk/acconfig.h' &&
/* acconfig.h -- used by autoheader when generating c-auto.h.in. */
X
/* Define if your putenv doesn't waste space when the same environment
X variable is assigned more than once, with different (malloced)
X values. This is true only on NetBSD/FreeBSD, as far as I know. See
X xputenv.c. */
#undef SMART_PUTENV
X
/* Define if you are using GNU libc or otherwise have global variables
X `program_invocation_name' and `program_invocation_short_name'. */
#undef HAVE_PROGRAM_INVOCATION_NAME
X
/* Define if you get clashes concerning wchar_t, between X's include
X files and system includes. */
#undef FOIL_X_WCHAR_T
X
/* Define if you have SIGIO, F_SETOWN, and FASYNC. */
#undef HAVE_SIGIO
SHAR_EOF
$shar_touch -am 0105144695 'gsftopk/acconfig.h' &&
chmod 0644 'gsftopk/acconfig.h' ||
echo 'restore of gsftopk/acconfig.h failed'
shar_count="`wc -c < 'gsftopk/acconfig.h'`"
test 694 -eq "$shar_count" ||
echo "gsftopk/acconfig.h: original size 694, current size $shar_count"
fi
# ============= gsftopk/c-auto.h.in ==============
if test -f 'gsftopk/c-auto.h.in' && test X"$1" != X"-c"; then
echo 'x - skipping gsftopk/c-auto.h.in (file already exists)'
else
echo 'x - extracting gsftopk/c-auto.h.in (text)'
sed 's/^X//' << 'SHAR_EOF' > 'gsftopk/c-auto.h.in' &&
/* c-auto.h.in. Generated automatically from configure.in by autoheader. */
X
/* Define if the closedir function returns void instead of int. */
#undef CLOSEDIR_VOID
X
/* Define to empty if the keyword does not work. */
#undef const
X
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
X
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
X
/* Define if you have <vfork.h>. */
#undef HAVE_VFORK_H
X
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
X
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
X
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
X
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
X
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
X
/* Define vfork as fork if vfork does not work. */
#undef vfork
X
/* Define if your putenv doesn't waste space when the same environment
X variable is assigned more than once, with different (malloced)
X values. This is true only on NetBSD/FreeBSD, as far as I know. See
X xputenv.c. */
#undef SMART_PUTENV
X
/* Define if you are using GNU libc or otherwise have global variables
X `program_invocation_name' and `program_invocation_short_name'. */
#undef HAVE_PROGRAM_INVOCATION_NAME
X
/* Define if you have the basename function. */
#undef HAVE_BASENAME
X
/* Define if you have the bcopy function. */
#undef HAVE_BCOPY
X
/* Define if you have the memmove function. */
#undef HAVE_MEMMOVE
X
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
X
/* Define if you have the <assert.h> header file. */
#undef HAVE_ASSERT_H
X
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
X
/* Define if you have the <float.h> header file. */
#undef HAVE_FLOAT_H
X
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
X
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
X
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
X
/* Define if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
X
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
X
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
X
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
X
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
X
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
SHAR_EOF
$shar_touch -am 0105144595 'gsftopk/c-auto.h.in' &&
chmod 0644 'gsftopk/c-auto.h.in' ||
echo 'restore of gsftopk/c-auto.h.in failed'
shar_count="`wc -c < 'gsftopk/c-auto.h.in'`"
test 2526 -eq "$shar_count" ||
echo "gsftopk/c-auto.h.in: original size 2526, current size $shar_count"
fi
# ============= gsftopk/configure ==============
if test -f 'gsftopk/configure' && test X"$1" != X"-c"; then
echo 'x - skipping gsftopk/configure (file already exists)'
else
echo 'x - extracting gsftopk/configure (text)'
sed 's/^X//' << 'SHAR_EOF' > 'gsftopk/configure' &&
#!/bin/sh
X
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.1
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
X
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
X
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
X
# Initialize some other variables.
subdirs=
X
ac_prev=
for ac_option
do
X
X # If the previous option needs an argument, assign it.
X if test -n "$ac_prev"; then
X eval "$ac_prev=\$ac_option"
X ac_prev=
X continue
X fi
X
X case "$ac_option" in
X -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
X *) ac_optarg= ;;
X esac
X
X # Accept the important Cygnus configure options, so we can diagnose typos.
X
X case "$ac_option" in
X
X -build | --build | --buil | --bui | --bu | --b)
X ac_prev=build ;;
X -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
X build="$ac_optarg" ;;
X
X -cache-file | --cache-file | --cache-fil | --cache-fi \
X | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
X ac_prev=cache_file ;;
X -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
X | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
X cache_file="$ac_optarg" ;;
X
X -disable-* | --disable-*)
X ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
X # Reject names that are not valid shell variable names.
X if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
X { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
X fi
X ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X eval "enable_${ac_feature}=no" ;;
X
X -enable-* | --enable-*)
X ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
X # Reject names that are not valid shell variable names.
X if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
X { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
X fi
X ac_feature=`echo $ac_feature| sed 's/-/_/g'`
X case "$ac_option" in
X *=*) ;;
X *) ac_optarg=yes ;;
X esac
X eval "enable_${ac_feature}='$ac_optarg'" ;;
X
X -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
X | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
X | --exec | --exe | --ex)
X ac_prev=exec_prefix ;;
X -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
X | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
X | --exec=* | --exe=* | --ex=*)
X exec_prefix="$ac_optarg" ;;
X
X -gas | --gas | --ga | --g)
X # Obsolete; use --with-gas.
X with_gas=yes ;;
X
X -help | --help | --hel | --he)
X # Omit some internal or obsolete options to make the list less imposing.
X # This message is too long to be a string in the A/UX 3.1 sh.
X cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
X --cache-file=FILE cache test results in FILE
X --help print this message
X --no-create do not create output files
X --quiet, --silent do not print \`checking...' messages
X --version print the version of autoconf that created configure
Directory and file names:
X --prefix=PREFIX install architecture-independent files in PREFIX
X [$ac_default_prefix]
X --exec-prefix=PREFIX install architecture-dependent files in PREFIX
X [same as prefix]
X --srcdir=DIR find the sources in DIR [configure dir or ..]
X --program-prefix=PREFIX prepend PREFIX to installed program names
X --program-suffix=SUFFIX append SUFFIX to installed program names
X --program-transform-name=PROGRAM run sed PROGRAM on installed program names
Host type:
X --build=BUILD configure for building on BUILD [BUILD=HOST]
X --host=HOST configure for HOST [guessed]
X --target=TARGET configure for TARGET [TARGET=HOST]
Features and packages:
X --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
X --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
X --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
X --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
X --x-includes=DIR X include files are in DIR
X --x-libraries=DIR X library files are in DIR
--enable and --with options recognized:$ac_help
EOF
X exit 0 ;;
X
X -host | --host | --hos | --ho)
X ac_prev=host ;;
X -host=* | --host=* | --hos=* | --ho=*)
X host="$ac_optarg" ;;
X
X -nfp | --nfp | --nf)
X # Obsolete; use --without-fp.
X with_fp=no ;;
X
X -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X | --no-cr | --no-c)
X no_create=yes ;;
X
X -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
X no_recursion=yes ;;
X
X -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
X ac_prev=prefix ;;
X -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
X prefix="$ac_optarg" ;;
X
X -program-prefix | --program-prefix | --program-prefi | --program-pref \
X | --program-pre | --program-pr | --program-p)
X ac_prev=program_prefix ;;
X -program-prefix=* | --program-prefix=* | --program-prefi=* \
X | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
X program_prefix="$ac_optarg" ;;
X
X -program-suffix | --program-suffix | --program-suffi | --program-suff \
X | --program-suf | --program-su | --program-s)
X ac_prev=program_suffix ;;
X -program-suffix=* | --program-suffix=* | --program-suffi=* \
X | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
X program_suffix="$ac_optarg" ;;
X
X -program-transform-name | --program-transform-name \
X | --program-transform-nam | --program-transform-na \
X | --program-transform-n | --program-transform- \
X | --program-transform | --program-transfor \
X | --program-transfo | --program-transf \
X | --program-trans | --program-tran \
X | --progr-tra | --program-tr | --program-t)
X ac_prev=program_transform_name ;;
X -program-transform-name=* | --program-transform-name=* \
X | --program-transform-nam=* | --program-transform-na=* \
X | --program-transform-n=* | --program-transform-=* \
X | --program-transform=* | --program-transfor=* \
X | --program-transfo=* | --program-transf=* \
X | --program-trans=* | --program-tran=* \
X | --progr-tra=* | --program-tr=* | --program-t=*)
X program_transform_name="$ac_optarg" ;;
X
X -q | -quiet | --quiet | --quie | --qui | --qu | --q \
X | -silent | --silent | --silen | --sile | --sil)
X silent=yes ;;
X
X -site | --site | --sit)
X ac_prev=site ;;
X -site=* | --site=* | --sit=*)
X site="$ac_optarg" ;;
X
X -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
X ac_prev=srcdir ;;
X -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
X srcdir="$ac_optarg" ;;
X
X -target | --target | --targe | --targ | --tar | --ta | --t)
X ac_prev=target ;;
X -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
X target="$ac_optarg" ;;
X
X -v | -verbose | --verbose | --verbos | --verbo | --verb)
X verbose=yes ;;
X
X -version | --version | --versio | --versi | --vers)
X echo "configure generated by autoconf version 2.1"
X exit 0 ;;
X
X -with-* | --with-*)
X ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
X # Reject names that are not valid shell variable names.
X if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
X { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
X fi
X ac_package=`echo $ac_package| sed 's/-/_/g'`
X case "$ac_option" in
X *=*) ;;
X *) ac_optarg=yes ;;
X esac
X eval "with_${ac_package}='$ac_optarg'" ;;
X
X -without-* | --without-*)
X ac_package=`echo $ac_option|sed -e 's/-*without-//'`
X # Reject names that are not valid shell variable names.
X if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
X { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
X fi
X ac_package=`echo $ac_package| sed 's/-/_/g'`
X eval "with_${ac_package}=no" ;;
X
X --x)
X # Obsolete; use --with-x.
X with_x=yes ;;
X
X -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
X | --x-incl | --x-inc | --x-in | --x-i)
X ac_prev=x_includes ;;
X -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
X | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
X x_includes="$ac_optarg" ;;
X
X -x-libraries | --x-libraries | --x-librarie | --x-librari \
X | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
X ac_prev=x_libraries ;;
X -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
X | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
X x_libraries="$ac_optarg" ;;
X
X -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
X ;;
X
X *)
X if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
X echo "configure: warning: $ac_option: invalid host type" 1>&2
X fi
X if test "x$nonopt" != xNONE; then
X { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
X fi
X nonopt="$ac_option"
X ;;
X
X esac
done
X
if test -n "$ac_prev"; then
X { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
X
trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
X
# File descriptor usage:
# 0 unused; standard input
# 1 file creation
# 2 errors and warnings
# 3 unused; some systems may open it to /dev/tty
# 4 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
X exec 4>/dev/null
else
X exec 4>&1
fi
exec 5>./config.log
X
echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
X
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
X case "$ac_arg" in
X -no-create | --no-create | --no-creat | --no-crea | --no-cre \
X | --no-cr | --no-c) ;;
X -no-recursion | --no-recursion | --no-recursio | --no-recursi \
X | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
X *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
X ac_configure_args="$ac_configure_args '$ac_arg'" ;;
X *) ac_configure_args="$ac_configure_args $ac_arg" ;;
X esac
done
X
# NLS nuisances.
# Only set LANG and LC_ALL to C if already set.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
X
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
X
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=gsftopk.c
X
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
X ac_srcdir_defaulted=yes
X # Try the directory containing this script, then its parent.
X ac_prog=$0
X ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
X test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
X srcdir=$ac_confdir
X if test ! -r $srcdir/$ac_unique_file; then
X srcdir=..
X fi
else
X ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
X if test "$ac_srcdir_defaulted" = yes; then
X { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
X else
X { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
X fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
X
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
X if test "x$prefix" != xNONE; then
X CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
X else
X CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
X fi
fi
for ac_site_file in $CONFIG_SITE; do
X if test -r "$ac_site_file"; then
X echo "loading site script $ac_site_file"
X . "$ac_site_file"
X fi
done
X
if test -r "$cache_file"; then
X echo "loading cache $cache_file"
X . $cache_file
else
X echo "creating cache $cache_file"
X > $cache_file
fi
X
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
X
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
X # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
X if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
X ac_n= ac_c='
' ac_t=' '
X else
X ac_n=-n ac_c= ac_t=
X fi
else
X ac_n= ac_c='\c' ac_t=
fi
X
X
X
X
X
X
echo $ac_n "checking whether ${MAKE-make} sets \$MAKE""... $ac_c" 1>&4
set dummy ${MAKE-make}; ac_make=$2
if eval "test \"`echo '${'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftestmake <<\EOF
all:
X @echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
X eval ac_cv_prog_make_${ac_make}_set=yes
else
X eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
X echo "$ac_t""yes" 1>&4
X SET_MAKE=
else
X echo "$ac_t""no" 1>&4
X SET_MAKE="MAKE=${MAKE-make}"
fi
X
X
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X if test -n "$CC"; then
X ac_cv_prog_CC="$CC" # Let the user override the test.
else
X IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
X for ac_dir in $PATH; do
X test -z "$ac_dir" && ac_dir=.
X if test -f $ac_dir/$ac_word; then
X ac_cv_prog_CC="gcc"
X break
X fi
X done
X IFS="$ac_save_ifs"
X test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
X echo "$ac_t""$CC" 1>&4
else
X echo "$ac_t""no" 1>&4
fi
X
X
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.c <<EOF
#ifdef __GNUC__
X yes;
#endif
EOF
if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
X ac_cv_prog_gcc=yes
else
X ac_cv_prog_gcc=no
fi
fi
echo "$ac_t""$ac_cv_prog_gcc" 1>&4
if test $ac_cv_prog_gcc = yes; then
X GCC=yes
X if test "${CFLAGS+set}" != set; then
X echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
X ac_cv_prog_gcc_g=yes
else
X ac_cv_prog_gcc_g=no
fi
rm -f conftest*
X
fi
X echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
X if test $ac_cv_prog_gcc_g = yes; then
X CFLAGS="-g -O"
X else
X CFLAGS="-O"
X fi
X fi
else
X GCC=
X test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
X
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
X if test -f $ac_dir/install-sh; then
X ac_aux_dir=$ac_dir
X ac_install_sh="$ac_aux_dir/install-sh -c"
X break
X elif test -f $ac_dir/install.sh; then
X ac_aux_dir=$ac_dir
X ac_install_sh="$ac_aux_dir/install.sh -c"
X break
X fi
done
if test -z "$ac_aux_dir"; then
X { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
X
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
if test -z "$INSTALL"; then
if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
X for ac_dir in $PATH; do
X case "$ac_dir" in
X ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
X *)
X # OSF1 and SCO ODT 3.0 have their own names for install.
X for ac_prog in ginstall installbsd scoinst install; do
X if test -f $ac_dir/$ac_prog; then
X if test $ac_prog = install &&
X grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
X # AIX install. It has an incompatible calling convention.
X # OSF/1 installbsd also uses dspmsg, but is usable.
X :
X else
X ac_cv_path_install="$ac_dir/$ac_prog -c"
X break 2
X fi
X fi
X done
X ;;
X esac
X done
X IFS="$ac_save_ifs"
X # As a last resort, use the slow shell script.
X test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
fi
X INSTALL="$ac_cv_path_install"
fi
echo "$ac_t""$INSTALL" 1>&4
X
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
X
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
X
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X if test -n "$RANLIB"; then
X ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
X IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
X for ac_dir in $PATH; do
X test -z "$ac_dir" && ac_dir=.
X if test -f $ac_dir/$ac_word; then
X ac_cv_prog_RANLIB="ranlib"
X break
X fi
X done
X IFS="$ac_save_ifs"
X test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
X echo "$ac_t""$RANLIB" 1>&4
else
X echo "$ac_t""no" 1>&4
fi
X
X
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&4
if test -d /etc/conf/kconfig.d &&
X grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
X echo "$ac_t""yes" 1>&4
X ISC=yes # If later tests want to check for ISC.
X cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF
X
X if test "$GCC" = yes; then
X CC="$CC -posix"
X else
X CC="$CC -Xp"
X fi
else
X echo "$ac_t""no" 1>&4
X ISC=
fi
X
X
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 634 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() { return 0; }
int t() {
DIR *dirp = 0;
; return 0; }
EOF
if eval $ac_compile; then
X rm -rf conftest*
X eval "ac_cv_header_dirent_$ac_safe=yes"
else
X rm -rf conftest*
X eval "ac_cv_header_dirent_$ac_safe=no"
fi
rm -f conftest*
X
fi
if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
X echo "$ac_t""yes" 1>&4
X ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
X cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
X ac_header_dirent=$ac_hdr; break
else
X echo "$ac_t""no" 1>&4
fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for -ldir""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_lib_dir'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X ac_save_LIBS="$LIBS"
LIBS="$LIBS -ldir "
cat > conftest.$ac_ext <<EOF
#line 673 "configure"
#include "confdefs.h"
X
int main() { return 0; }
int t() {
opendir()
; return 0; }
EOF
if eval $ac_link; then
X rm -rf conftest*
X eval "ac_cv_lib_dir=yes"
else
X rm -rf conftest*
X eval "ac_cv_lib_dir=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
X
fi
if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
X echo "$ac_t""yes" 1>&4
X LIBS="$LIBS -ldir"
else
X echo "$ac_t""no" 1>&4
fi
X
else
echo $ac_n "checking for -lx""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_lib_x'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X ac_save_LIBS="$LIBS"
LIBS="$LIBS -lx "
cat > conftest.$ac_ext <<EOF
#line 707 "configure"
#include "confdefs.h"
X
int main() { return 0; }
int t() {
opendir()
; return 0; }
EOF
if eval $ac_link; then
X rm -rf conftest*
X eval "ac_cv_lib_x=yes"
else
X rm -rf conftest*
X eval "ac_cv_lib_x=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
X
fi
if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
X echo "$ac_t""yes" 1>&4
X LIBS="$LIBS -lx"
else
X echo "$ac_t""no" 1>&4
fi
X
fi
X
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
X CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X # This must be in double quotes, not single quotes, because CPP may get
X # substituted into the Makefile and "${CC-cc}" will confuse make.
X CPP="${CC-cc} -E"
X # On the NeXT, cc -E runs the code through the compiler's parser,
X # not just through cpp.
X cat > conftest.$ac_ext <<EOF
#line 750 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
X :
else
X echo "$ac_err" >&5
X rm -rf conftest*
X CPP="${CC-cc} -E -traditional-cpp"
X cat > conftest.$ac_ext <<EOF
#line 764 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
X :
else
X echo "$ac_err" >&5
X rm -rf conftest*
X CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
X ac_cv_prog_CPP="$CPP"
fi
fi
CPP="$ac_cv_prog_CPP"
echo "$ac_t""$CPP" 1>&4
X
# If we cannot run a trivial program, we must be cross compiling.
echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X if test "$cross_compiling" = yes; then
X ac_cv_cross=yes
else
cat > conftest.$ac_ext <<EOF
#line 796 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
X ac_cv_c_cross=no
else
X ac_cv_c_cross=yes
fi
fi
rm -fr conftest*
fi
cross_compiling=$ac_cv_c_cross
echo "$ac_t""$ac_cv_c_cross" 1>&4
X
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 817 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
X rm -rf conftest*
X ac_cv_header_stdc=yes
else
X echo "$ac_err" >&5
X rm -rf conftest*
X ac_cv_header_stdc=no
fi
rm -f conftest*
X
if test $ac_cv_header_stdc = yes; then
X # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 839 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X egrep "memchr" >/dev/null 2>&1; then
X :
else
X rm -rf conftest*
X ac_cv_header_stdc=no
fi
rm -f conftest*
X
fi
X
if test $ac_cv_header_stdc = yes; then
X # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 857 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X egrep "free" >/dev/null 2>&1; then
X :
else
X rm -rf conftest*
X ac_cv_header_stdc=no
fi
rm -f conftest*
X
fi
X
if test $ac_cv_header_stdc = yes; then
X # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
X ac_cv_header_stdc=no
else
cat > conftest.$ac_ext <<EOF
#line 878 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
X
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
X :
else
X ac_cv_header_stdc=no
fi
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_header_stdc" 1>&4
if test $ac_cv_header_stdc = yes; then
X cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF
X
fi
X
echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_func_closedir_void'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X if test "$cross_compiling" = yes; then
X { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 915 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
X ac_cv_func_closedir_void=no
else
X ac_cv_func_closedir_void=yes
fi
fi
rm -fr conftest*
fi
echo "$ac_t""$ac_cv_func_closedir_void" 1>&4
if test $ac_cv_func_closedir_void = yes; then
X cat >> confdefs.h <<\EOF
#define CLOSEDIR_VOID 1
EOF
X
fi
X
for ac_hdr in assert.h float.h limits.h memory.h pwd.h stdlib.h \
X string.h unistd.h
do
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 947 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
X rm -rf conftest*
X eval "ac_cv_header_$ac_safe=yes"
else
X echo "$ac_err" >&5
X rm -rf conftest*
X eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X echo "$ac_t""yes" 1>&4
X ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
X cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
X
else
X echo "$ac_t""no" 1>&4
fi
done
X
X
for ac_func in basename bcopy memmove putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 983 "configure"
#include "confdefs.h"
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
/* Override any gcc2 internal prototype to avoid an error. */
char $ac_func();
X
int main() { return 0; }
int t() {
X
/* The GNU C library defines this for functions which it implements
X to always fail with ENOSYS. Some functions are actually named
X something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
X
; return 0; }
EOF
if eval $ac_link; then
X rm -rf conftest*
X eval "ac_cv_func_$ac_func=yes"
else
X rm -rf conftest*
X eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
X
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
X echo "$ac_t""yes" 1>&4
X ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
X cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
X
else
X echo "$ac_t""no" 1>&4
fi
done
X
X
echo $ac_n "checking for working const""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_c_const'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 1031 "configure"
#include "confdefs.h"
X
int main() { return 0; }
int t() {
X
/* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero;
/* AIX XL C 1.02.0.0 rejects this.
X It does not let you subtract one const X* pointer from another in an arm
X of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this. */
X char *t;
X char const *s = 0 ? (char *) 0 : (char const *) 0;
X
X *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
X int x[] = {25, 17};
X const int *foo = &x[0];
X ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
X typedef const int *iptr;
X iptr p = 0;
X ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
X "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
X struct s { int j; const int *ap[3]; };
X struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
X const int foo = 10;
}
X
; return 0; }
EOF
if eval $ac_compile; then
X rm -rf conftest*
X ac_cv_c_const=yes
else
X rm -rf conftest*
X ac_cv_c_const=no
fi
rm -f conftest*
X
fi
echo "$ac_t""$ac_cv_c_const" 1>&4
if test $ac_cv_c_const = no; then
X cat >> confdefs.h <<\EOF
#define const
EOF
X
fi
X
X
X
# This is a GNU libc invention.
echo $ac_n "checking whether program_invocation_name is predefined""... $ac_c" 1>&4
if eval "test \"`echo '${'kb_cv_var_program_inv_name'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 1107 "configure"
#include "confdefs.h"
X
int main() { return 0; }
int t() {
main() { program_invocation_name = "love"; }
; return 0; }
EOF
if eval $ac_link; then
X rm -rf conftest*
X kb_cv_var_program_inv_name=yes
else
X rm -rf conftest*
X kb_cv_var_program_inv_name=no
fi
rm -f conftest*
X
fi
echo "$ac_t""$kb_cv_var_program_inv_name" 1>&4
if test $kb_cv_var_program_inv_name = yes; then
X cat >> confdefs.h <<\EOF
#define HAVE_PROGRAM_INVOCATION_NAME 1
EOF
X
fi
X
X
# Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment.
# This test program is due to Mike Hibler <mike@cs.utah.edu>.
# We don't actually need to run this if we don't have putenv, but it
# doesn't hurt.
echo $ac_n "checking whether putenv uses malloc""... $ac_c" 1>&4
if eval "test \"`echo '${'kb_cv_func_putenv_malloc'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X if test "$cross_compiling" = yes; then
X kb_cv_func_putenv_malloc=no
else
cat > conftest.$ac_ext <<EOF
#line 1146 "configure"
#include "confdefs.h"
X
#define VAR "YOW_VAR"
#define STRING1 "GabbaGabbaHey"
#define STRING2 "Yow!!" /* should be shorter than STRING1 */
extern char *getenv (); /* in case char* and int don't mix gracefully */
main ()
{
X char *str1, *rstr1, *str2, *rstr2;
X str1 = getenv (VAR);
X if (str1)
X exit (1);
X str1 = malloc (strlen (VAR) + 1 + strlen (STRING1) + 1);
X if (str1 == 0)
X exit (2);
X strcpy (str1, VAR);
X strcat (str1, "=");
X strcat (str1, STRING1);
X if (putenv (str1) < 0)
X exit (3);
X rstr1 = getenv (VAR);
X if (rstr1 == 0)
X exit (4);
X rstr1 -= strlen (VAR) + 1;
X if (strncmp (rstr1, VAR, strlen (VAR)))
X exit (5);
X str2 = malloc (strlen (VAR) + 1 + strlen (STRING2) + 1);
X if (str2 == 0 || str1 == str2)
X exit (6);
X strcpy (str2, VAR);
X strcat (str2, "=");
X strcat (str2, STRING2);
X if (putenv (str2) < 0)
X exit (7);
X rstr2 = getenv (VAR);
X if (rstr2 == 0)
X exit (8);
X rstr2 -= strlen (VAR) + 1;
#if 0
X printf ("rstr1=0x%x, rstr2=0x%x\n", rstr1, rstr2);
X /*
X * If string from first call was reused for the second call,
X * you had better not do a free on the first string!
X */
X if (rstr1 == rstr2)
X printf ("#define SMART_PUTENV\n");
X else
X printf ("#undef SMART_PUTENV\n");
#endif
X exit (rstr1 == rstr2 ? 0 : 1);
}
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
X kb_cv_func_putenv_malloc=yes
else
X kb_cv_func_putenv_malloc=no
fi
fi
rm -fr conftest*
fi
echo "$ac_t""$kb_cv_func_putenv_malloc" 1>&4
if test $kb_cv_func_putenv_malloc = yes; then
X cat >> confdefs.h <<\EOF
#define SMART_PUTENV 1
EOF
X
fi
X
X
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 1222 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
int main() { return 0; }
int t() {
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
if eval $ac_compile; then
X rm -rf conftest*
X ac_cv_header_sys_wait_h=yes
else
X rm -rf conftest*
X ac_cv_header_sys_wait_h=no
fi
rm -f conftest*
X
fi
echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&4
if test $ac_cv_header_sys_wait_h = yes; then
X cat >> confdefs.h <<\EOF
#define HAVE_SYS_WAIT_H 1
EOF
X
fi
X
X
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_func_memcmp'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X if test "$cross_compiling" = yes; then
X ac_cv_func_memcmp=no
else
cat > conftest.$ac_ext <<EOF
#line 1266 "configure"
#include "confdefs.h"
X
main()
{
X char c0 = 0x40, c1 = 0x80, c2 = 0x81;
X exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}
X
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
X ac_cv_func_memcmp=yes
else
X ac_cv_func_memcmp=no
fi
fi
rm -fr conftest*
fi
echo "$ac_t""$ac_cv_func_memcmp" 1>&4
test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o"
X
echo $ac_n "checking for pid_t""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_type_pid_t'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 1293 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
X egrep "pid_t" >/dev/null 2>&1; then
X rm -rf conftest*
X ac_cv_type_pid_t=yes
else
X rm -rf conftest*
X ac_cv_type_pid_t=no
fi
rm -f conftest*
X
fi
echo "$ac_t""$ac_cv_type_pid_t" 1>&4
if test $ac_cv_type_pid_t = no; then
X cat >> confdefs.h <<\EOF
#define pid_t int
EOF
X
fi
X
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_type_signal'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 1324 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
extern void (*signal ()) ();
int main() { return 0; }
int t() {
int i;
; return 0; }
EOF
if eval $ac_compile; then
X rm -rf conftest*
X ac_cv_type_signal=void
else
X rm -rf conftest*
X ac_cv_type_signal=int
fi
rm -f conftest*
X
fi
echo "$ac_t""$ac_cv_type_signal" 1>&4
cat >> confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF
X
X
ac_safe=`echo "vfork.h" | tr './\055' '___'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 1359 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
X rm -rf conftest*
X eval "ac_cv_header_$ac_safe=yes"
else
X echo "$ac_err" >&5
X rm -rf conftest*
X eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
X echo "$ac_t""yes" 1>&4
X cat >> confdefs.h <<\EOF
#define HAVE_VFORK_H 1
EOF
X
else
X echo "$ac_t""no" 1>&4
fi
X
echo $ac_n "checking for working vfork""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_func_vfork'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X
if test "$cross_compiling" = yes; then
X ac_cv_func_vfork=no
else
cat > conftest.$ac_ext <<EOF
#line 1394 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
/* On sparc systems, changes by the child to local and incoming
X argument registers are propagated back to the parent.
X The compiler is told about this with #include <vfork.h>,
X but some compilers (e.g. gcc -O) don't grok <vfork.h>.
X Test for this by using a static variable whose address
X is put into a register that is clobbered by the vfork. */
static
#ifdef __cplusplus
sparc_address_test (int arg)
#else
sparc_address_test (arg) int arg;
#endif
{
X static pid_t child;
X if (!child) {
X child = vfork ();
X if (child < 0)
X perror ("vfork");
X if (!child) {
X arg = getpid();
X write(-1, "", 0);
X _exit (arg);
X }
X }
}
static int signalled;
static RETSIGTYPE catch (s) int s; { signalled = 1; }
main() {
X pid_t parent = getpid ();
X pid_t child;
X
X sparc_address_test ();
X
X signal (SIGINT, catch);
X
X child = vfork ();
X
X if (child == 0) {
X /* Here is another test for sparc vfork register problems.
X This test uses lots of local variables, at least
X as many local variables as main has allocated so far
X including compiler temporaries. 4 locals are enough for
X gcc 1.40.3 on a sparc, but we use 8 to be safe.
X A buggy compiler should reuse the register of parent
X for one of the local variables, since it will think that
X parent can't possibly be used any more in this routine.
X Assigning to the local variable will thus munge parent
X in the parent process. */
X pid_t
X p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
X p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
X /* Convince the compiler that p..p7 are live; otherwise, it might
X use the same hardware register for all 8 local variables. */
X if (p != p1 || p != p2 || p != p3 || p != p4
X || p != p5 || p != p6 || p != p7)
X _exit(1);
X
X /* On some systems (e.g. SunOS 5.2), if the parent is catching
X a signal, the child ignores the signal before execing,
X and the parent later receives that signal, the parent dumps core.
X Test for this by ignoring SIGINT in the child. */
X signal (SIGINT, SIG_IGN);
X
X /* On some systems (e.g. IRIX 3.3),
X vfork doesn't separate parent from child file descriptors.
X If the child closes a descriptor before it execs or exits,
X this munges the parent's descriptor as well.
X Test for this by closing stdout in the child. */
X _exit(close(fileno(stdout)) != 0);
X } else {
X int status;
X struct stat st;
X
X while (wait(&status) != child)
X ;
X exit(
X /* Was there some problem with vforking? */
X child < 0
X
X /* Did the child fail? (This shouldn't happen.) */
X || status
X
X /* Did the vfork/compiler bug occur? */
X || parent != getpid()
X
X /* Did the signal handling bug occur? */
X || kill(parent, SIGINT) != 0
X || signalled != 1
X
X /* Did the file descriptor bug occur? */
X || fstat(fileno(stdout), &st) != 0
X );
X }
}
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
X ac_cv_func_vfork=yes
else
X ac_cv_func_vfork=no
fi
fi
rm -fr conftest*
fi
echo "$ac_t""$ac_cv_func_vfork" 1>&4
if test $ac_cv_func_vfork = no; then
X cat >> confdefs.h <<\EOF
#define vfork fork
EOF
X
fi
X
echo $ac_n "checking for vprintf""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_func_vprintf'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 1524 "configure"
#include "confdefs.h"
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
/* Override any gcc2 internal prototype to avoid an error. */
char vprintf();
X
int main() { return 0; }
int t() {
X
/* The GNU C library defines this for functions which it implements
X to always fail with ENOSYS. Some functions are actually named
X something starting with __ and the normal name is an alias. */
#if defined (__stub_vprintf) || defined (__stub___vprintf)
choke me
#else
vprintf();
#endif
X
; return 0; }
EOF
if eval $ac_link; then
X rm -rf conftest*
X eval "ac_cv_func_vprintf=yes"
else
X rm -rf conftest*
X eval "ac_cv_func_vprintf=no"
fi
rm -f conftest*
X
fi
if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
X echo "$ac_t""yes" 1>&4
X cat >> confdefs.h <<\EOF
#define HAVE_VPRINTF 1
EOF
X
else
X echo "$ac_t""no" 1>&4
fi
X
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&4
if eval "test \"`echo '${'ac_cv_func__doprnt'+set}'`\" = set"; then
X echo $ac_n "(cached) $ac_c" 1>&4
else
X cat > conftest.$ac_ext <<EOF
#line 1570 "configure"
#include "confdefs.h"
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
/* Override any gcc2 internal prototype to avoid an error. */
char _doprnt();
X
int main() { return 0; }
int t() {
X
/* The GNU C library defines this for functions which it implements
X to always fail with ENOSYS. Some functions are actually named
X something starting with __ and the normal name is an alias. */
#if defined (__stub__doprnt) || defined (__stub____doprnt)
choke me
#else
_doprnt();
#endif
X
; return 0; }
EOF
if eval $ac_link; then
X rm -rf conftest*
X eval "ac_cv_func__doprnt=yes"
else
X rm -rf conftest*
X eval "ac_cv_func__doprnt=no"
fi
rm -f conftest*
X
fi
if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
X echo "$ac_t""yes" 1>&4
X cat >> confdefs.h <<\EOF
#define HAVE_DOPRNT 1
EOF
X
else
X echo "$ac_t""no" 1>&4
fi
X
fi
X
X
trap '' 1 2 15
if test -w $cache_file; then
echo "updating cache $cache_file"
cat > $cache_file <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# Ultrix sh set writes to stderr and can't be redirected directly.
(set) 2>&1 |
X sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
X >> $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
X
trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
X
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
X
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
X ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
fi
X
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
X
DEFS=-DHAVE_CONFIG_H
X
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
X
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#!/bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
X
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
X case "\$ac_option" in
X -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
X echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
X exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
X -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
X echo "$CONFIG_STATUS generated by autoconf version 2.1"
X exit 0 ;;
X -help | --help | --hel | --he | --h)
X echo "\$ac_cs_usage"; exit 0 ;;
X *) echo "\$ac_cs_usage"; exit 1 ;;
X esac
done
X
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
X
trap 'rm -fr Makefile c-auto.h conftest*; exit 1' 1 2 15
X
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
X s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
$ac_vpsub
$extrasub
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@SET_MAKE@%$SET_MAKE%g
s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@RANLIB@%$RANLIB%g
s%@CPP@%$CPP%g
s%@LIBOBJS@%$LIBOBJS%g
X
CEOF
EOF
cat >> $CONFIG_STATUS <<EOF
X
CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
X # Support "outfile[:infile]", defaulting infile="outfile.in".
X case "$ac_file" in
X *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
X ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X *) ac_file_in="${ac_file}.in" ;;
X esac
X
X # Adjust relative srcdir, etc. for subdirectories.
X
X # Remove last slash and all that follows it. Not all systems have dirname.
X ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
X if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
X # The file is in a subdirectory.
X test ! -d "$ac_dir" && mkdir "$ac_dir"
X ac_dir_suffix="/$ac_dir"
X # A "../" for each directory in $ac_dir_suffix.
X ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
X else
X ac_dir_suffix= ac_dots=
X fi
X
X case "$ac_given_srcdir" in
X .) srcdir=.
X if test -z "$ac_dots"; then top_srcdir=.
X else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
X /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
X *) # Relative path.
X srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
X top_srcdir="$ac_dots$ac_given_srcdir" ;;
X esac
X
X case "$ac_given_INSTALL" in
X [/$]*) INSTALL="$ac_given_INSTALL" ;;
X *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
X esac
X echo creating "$ac_file"
X rm -f "$ac_file"
X configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
X case "$ac_file" in
X *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
X *) ac_comsub= ;;
X esac
X # Replace lines of the form ac_include foo with the contents of foo:
X # first, from the ac_include lines construct a list of sed
X # commands to remove them, and include the files; then run sed.
X # Have to use sed because old (Ultrix, SunOS) awk does not support
X # getline or system. (Anyway, configure scripts aren't supposed to use awk.)
X # Use \@...@<cmd> form of sed address because the filename may contain /.
X # Can't use only one -e and commands {dr foo} because foo has to be last.
X # Use @e initially instead of -e because GNU echo has a -e option.
X # USe `X' to mean a bunch of backslashes; this is for FreeBSD.
X file_substs=`sed -n \
"/^ac_include/s%ac_include[ ]*\(.*\)%@e 'X@^&@r \1' -e 'X@^&@d'%p" \
X $ac_given_srcdir/${ac_file}.in`
X if test -n "$file_substs"; then
X # Change @e back to -e and X@^ to \@^.
X file_subst_cmd="sed `echo $file_substs \
X | sed -e 's/@e/-e/g' -e 's/X@^/\\\\\@^/g'`"
X else
X # If no substitutions and hence no sed commands, don't choke.
X file_subst_cmd=cat
X fi
X # cd into the srcdir because the files being included more or less
X # must be part of the distribution. I can't find any way to do
X # variable substitution in the sed commands (so the user could have,
X # e.g., $top_srcdir in their ac_include line).
X (cd $ac_given_srcdir && eval $file_subst_cmd ${ac_file}.in) \
X | sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" -f conftest.subs > $ac_file
fi; done
rm -f conftest.subs
X
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='\([ ]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'
X
CONFIG_HEADERS=${CONFIG_HEADERS-"c-auto.h"}
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
X # Support "outfile[:infile]", defaulting infile="outfile.in".
X case "$ac_file" in
X *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
X ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
X *) ac_file_in="${ac_file}.in" ;;
X esac
X
X echo creating $ac_file
X
X rm -f conftest.frag conftest.in conftest.out
X cp $ac_given_srcdir/$ac_file_in conftest.in
X
EOF
X
# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h. And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr
X
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >> conftest.vals <<\EOF
s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF
X
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
# Maximum number of lines to put in a single here document.
ac_max_here_lines=12
X
rm -f conftest.tail
while :
do
X ac_lines=`grep -c . conftest.vals`
X # grep -c gives empty output for an empty file on some AIX systems.
X if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
X # Write a limited-size here document to conftest.frag.
X echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
X sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
X echo 'CEOF
X sed -f conftest.frag conftest.in > conftest.out
X rm -f conftest.in
X mv conftest.out conftest.in
' >> $CONFIG_STATUS
X sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
X rm -f conftest.vals
X mv conftest.tail conftest.vals
done
rm -f conftest.vals
X
cat >> $CONFIG_STATUS <<\EOF
X rm -f conftest.frag conftest.h
X echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
X cat conftest.in >> conftest.h
X rm -f conftest.in
X if cmp -s $ac_file conftest.h 2>/dev/null; then
X echo "$ac_file is unchanged"
X rm -f conftest.h
X else
X rm -f $ac_file
X mv conftest.h $ac_file
X fi
fi; done
X
X
X
Xexit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
X
SHAR_EOF
$shar_touch -am 0105151395 'gsftopk/configure' &&
chmod 0755 'gsftopk/configure' ||
echo 'restore of gsftopk/configure failed'
shar_count="`wc -c < 'gsftopk/configure'`"
test 53177 -eq "$shar_count" ||
echo "gsftopk/configure: original size 53177, current size $shar_count"
fi
# ============= gsftopk/configure.in ==============
if test -f 'gsftopk/configure.in' && test X"$1" != X"-c"; then
echo 'x - skipping gsftopk/configure.in (file already exists)'
else
echo 'x - extracting gsftopk/configure.in (text)'
sed 's/^X//' << 'SHAR_EOF' > 'gsftopk/configure.in' &&
dnl Process this file with autoconf to produce a configure script.
AC_INIT(gsftopk.c)
X
sinclude(../kpathsea/common.ac)
X
dnl Checks for header files.
AC_HEADER_SYS_WAIT
X
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_VFORK
AC_FUNC_VPRINTF
X
AC_OUTPUT(Makefile)
SHAR_EOF
$shar_touch -am 1215232794 'gsftopk/configure.in' &&
chmod 0644 'gsftopk/configure.in' ||
echo 'restore of gsftopk/configure.in failed'
shar_count="`wc -c < 'gsftopk/configure.in'`"
test 269 -eq "$shar_count" ||
echo "gsftopk/configure.in: original size 269, current size $shar_count"
fi
# ============= gsftopk/gsftopk.1 ==============
if test -f 'gsftopk/gsftopk.1' && test X"$1" != X"-c"; then
echo 'x - skipping gsftopk/gsftopk.1 (file already exists)'
else
echo 'x - extracting gsftopk/gsftopk.1 (text)'
sed 's/^X//' << 'SHAR_EOF' > 'gsftopk/gsftopk.1' &&
X.\" Copyright (c) 1994 Paul Vojta. All rights reserved.
X.\"
X.\" Redistribution and use in source and binary forms, with or without
X.\" modification, are permitted provided that the following conditions
X.\" are met:
X.\" 1. Redistributions of source code must retain the above copyright
X.\" notice, this list of conditions and the following disclaimer.
X.\" 2. Redistributions in binary form must reproduce the above copyright
X.\" notice, this list of conditions and the following disclaimer in the
X.\" documentation and/or other materials provided with the distribution.
X.\"
X.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
X.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X.\" SUCH DAMAGE.
X.\"
X.TH GSFTOPK 1 "29 July 1994"
X.SH NAME
gsftopk \- render a ghostscript font in TeX pk format
X.SH SYNOPSIS
\fBgsftopk\fP [\fB\-q\fP] \fIfont\fP \fIdpi\fP
X.SH ARGUMENTS
X.IP \fIfont\fP \w'\fIfont\fP'u+2m
Name of the font to be created.
X.IP \fIdpi\fP
Desired resolution of the font to be created, in dots per inch. This may
be a real number.
X.SH DESCRIPTION
X.B gsftopk
is a program which calls up the ghostscript program
X.BR gs (1)
to render a given font at a given resolution. It packs the resulting
characters into the
X.B pk
file format and writes them to a file whose name is formed from the font
name and the resolution (rounded to the nearest integer).
X.PP
This program should normally be called by a script, such as
X.BR xdvimakepk ,
to create fonts on demand.
X.PP
X.B gsftopk
obtains the character widths from the
X.RI . tfm
file, which must exist in the standard search path. It also must be
able to find a file
X.B psfonts.map
(formatted as in
X.BR dvips (1)),
listing the available fonts.
X.SH OPTIONS
X.TP
X.B \-q
Operate quietly;
X.I i.e.,
without writing any messages to the standard output.
X.SH ENVIRONMENT VARIABLES
X.IP \fBTEXFONTS\fP \w'\fBDVIPSHEADERS\fP'u+2m
Colon-separated list of directories to search for the
X.RI . tfm
file associated with the font. An extra colon in the list will include the
system default path at that point. A double slash will enable recursive
subdirectory searching at that point in the path.
X.IP \fBDVIPSHEADERS\fP
Colon-separated list of directories to search for the ghostscript
driver file
X.B render.ps
and for any PostScript font files
X.RI (. pfa
or
X.RI . pfb
files). An extra colon in the list behaves as with
X.SB TEXFONTS.
X.IP \fBTEXCONFIG\fP
Path to search for the file
X.BR psfonts.map .
Only the first such file will be used.
X.SH BUGS
X.B gsftopk
sometimes has trouble with fonts with very complicated characters
(such as the Seal of the University of California). This is because
X.B gsftopk
uses the
X.B charpath
operator to determine the bounding box of each character. If the character
is too complicated, then it will exceed the allowable length of a path;
this causes
X.B gsftopk
to terminate with an error message
X.IP
X.B "Call to gs stopped by signal 10"
X.LP
(The number may vary from system to system; it corresponds to a bus error
or a segmentation fault.) This is actually a design limitation in PostScript,
exacerbated by a bug in
X.BR ghostscript ,
rather than a bug in
X.B gsftopk
itself. To work around this bug,
X.B gsftopk
can be instructed to use the bounding box provided with the font (if one
exists) instead of finding a bounding box for each character. To do this,
include the string
X.IP
X.B /usefontbbox true def
X.LP
in the
X.B psfonts.map
file;
X.IR e.g. ,
X.IP
X.B ucseal """/usefontbbox true def"""
X.LP
This will not affect use of the font by
X.BR dvips .
X.SH SEE ALSO
X.BR gs (1),
X.BR gftopk (1),
X.BR tex (1),
X.BR xdvi (1),
X.BR dvips (1)
X.SH AUTHOR
Written by Paul Vojta. This program was inspired by
X.BR gsrenderfont ,
which was written by Karl Berry.
SHAR_EOF
$shar_touch -am 0729000394 'gsftopk/gsftopk.1' &&
chmod 0644 'gsftopk/gsftopk.1' ||
echo 'restore of gsftopk/gsftopk.1 failed'
shar_count="`wc -c < 'gsftopk/gsftopk.1'`"
test 4386 -eq "$shar_count" ||
echo "gsftopk/gsftopk.1: original size 4386, current size $shar_count"
fi
# ============= gsftopk/gsftopk.c ==============
if test -f 'gsftopk/gsftopk.c' && test X"$1" != X"-c"; then
echo 'x - skipping gsftopk/gsftopk.c (file already exists)'
else
echo 'x - extracting gsftopk/gsftopk.c (text)'
sed 's/^X//' << 'SHAR_EOF' > 'gsftopk/gsftopk.c' &&
/*
X * Copyright (c) 1994 Paul Vojta. All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X * notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X * notice, this list of conditions and the following disclaimer in the
X * documentation and/or other materials provided with the distribution.
X *
X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X */
X
/*
X * Okt, 1994: Thomas Esser (te@informatik.uni-hannover.de)
X * ported to use kpathsea library from Karl Berry (Version 2.1)
X *
X * THIS VERSION IS ONLY TESTED UNDER LINUX BY NOW!
X *
X * Please direct bug-reports to me and *NOT* to Paul Vojta.
X * I will check, whether your problem applies to the original version
X * as well and in that case contact the author.
X */
X
#ifndef lint
static char copyright[] =
"@(#) Copyright (c) 1994 Paul Vojta. All rights reserved.\n";
#endif
X
#include <c-auto.h>
#include <errno.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <setjmp.h>
/* The stuff from the path searching library. */
#include <kpathsea/c-std.h>
#include <kpathsea/tex-file.h>
X
#ifndef GS
#define GS "gs"
#endif
X
#ifndef atof
double atof();
#endif
char *getenv();
X
#ifdef __GNUC__
#define NORETURN volatile
#else
#define NORETURN /* nothing */
#endif
X
#ifdef STDC_HEADERS
#define NeedVarargsPrototypes 1
#include <stdarg.h>
#else
#define NeedVarargsPrototypes 0
#include <varargs.h>
#endif
X
typedef char Boolean;
#define True 1
#define False 0
X
#ifndef MAXPATHLEN
#define MAXPATHLEN 256
#endif
X
#define PK_PRE (char) 247
#define PK_ID 89
#define PK_POST (char) 245
#define PK_NOP (char) 246
X
char ident[] = "gsftopk version 1.7";
X
typedef unsigned char byte;
X
FILE *data_file;
FILE *pk_file;
Boolean quiet = False;
int col = 0; /* current column number */
X
/*
X * Information from the .tfm file.
X */
X
int tfm_lengths[12];
#define lh tfm_lengths[1]
#define bc tfm_lengths[2]
#define ec tfm_lengths[3]
#define nw tfm_lengths[4]
X
long checksum;
long design;
byte width_index[256];
long tfm_widths[256];
X
/*
X * Information on the bitmap currently being worked on.
X */
X
byte *bitmap;
int width;
int skip;
int height;
int hoff;
int voff;
int bytes_wide;
unsigned int bm_size;
byte *bitmap_end;
int pk_len;
X
/*
X * Print error message and quit.
X */
X
#if NeedVarargsPrototypes
NORETURN void
oops(const char *message, ...)
#else
/* VARARGS */
NORETURN void
oops(va_alist)
X va_dcl
#endif
{
#if !NeedVarargsPrototypes
X const char *message;
#endif
X va_list args;
X
#if NeedVarargsPrototypes
X va_start(args, message);
#else
X va_start(args);
X message = va_arg(args, const char *);
#endif
X vfprintf(stderr, message, args);
X va_end(args);
X putc('\n', stderr);
X exit(1);
}
X
/*
X * Either allocate storage or fail with explanation.
X */
X
char *
xmalloc(size, why)
X unsigned size;
X const char *why;
{
X char *mem = (char *) malloc(size);
X
X if (mem == NULL)
X oops("Cannot allocate %u bytes for %s.\n", size, why);
X return mem;
}
X
/*
X * Either reallocate storage or fail with explanation.
X */
X
char *
xrealloc(oldp, size, why)
X char *oldp;
X unsigned size;
X const char *why;
{
X char *mem;
X
X mem = oldp == NULL ? (char *) malloc(size)
X : (char *) realloc(oldp, size);
X if (mem == NULL)
X oops("Cannot reallocate %u bytes for %s.\n", size, why);
X return mem;
}
X
/*
X * Here's the patch searching stuff. First the typedefs and variables.
X */
X
static char searchpath[MAXPATHLEN + 1];
X
#define HUNKSIZE (MAXPATHLEN + 2)
X
struct spacenode { /* used for storage of directory names */
X struct spacenode *next;
X char *sp_end; /* end of data for this chunk */
X char sp[HUNKSIZE];
}
X firstnode;
X
static jmp_buf found_env;
static FILE *searchfile;
static char *searchname;
static int searchnamelen;
X
/*
X * Add to dlstring
X */
X
char *dlstring = NULL;
unsigned int dls_len = 0;
unsigned int dls_max = 0;
X
void
addtodls(char *s)
{
X int len = strlen(s);
X
X if (dls_len + len >= dls_max) {
X unsigned int newsize = dls_max + 80;
X
X if (newsize <= dls_len + len) newsize = dls_len + len + 1;
X dlstring = xrealloc(dlstring, dls_max = newsize, "download string");
X }
X strcpy(dlstring + dls_len, s);
X dls_len += len;
}
X
X
X
long
getlong(FILE *f)
{
X int value;
X
X value = (int) ((byte) getc(f)) << 24;
X value |= (int) ((byte) getc(f)) << 16;
X value |= (int) ((byte) getc(f)) << 8;
X value |= (int) ((byte) getc(f));
X return value;
}
X
X
char line[82];
X
void
expect(char *waitingfor)
{
X for (;;) {
X if (fgets(line, sizeof(line), data_file) == NULL)
X oops("Premature end of file");
X if (memcmp(line, waitingfor, strlen(waitingfor)) == 0) return;
X fputs("gs: ", stdout);
X for (;;) {
X fputs(line, stdout);
X if (*line == '\0' || line[strlen(line) - 1] == '\n') break;
X if (fgets(line, sizeof(line), data_file) == NULL)
X oops("Premature end of file");
X }
X }
}
X
void
whitespace(void)
{
X char c = getc(data_file);
X
X if (!isspace(c) && c != '#')
X oops("white space expected");
X for (;;) {
X if (c == '#')
X do c = getc(data_file); while (!feof(data_file) && c != '\n');
X else if (!isspace(c)) {
X ungetc(c, data_file);
X break;
X }
X c = getc(data_file);
X }
}
X
int
getint(void)
{
X char c;
X int i = 0;
X
X do c = getc(data_file); while (isspace(c));
X if (c < '0' || c > '9') oops("digit expected");
X do {
X i = i * 10 + (c - '0');
X c = getc(data_file);
X } while (c >= '0' && c <= '9');
X if (!feof(data_file)) ungetc(c, data_file);
X return i;
}
X
static byte masks[] = {0, 1, 3, 7, 017, 037, 077, 0177, 0377};
X
byte flag;
int pk_dyn_f;
int pk_dyn_g;
int base; /* cost of this character if pk_dyn_f = 0 */
int deltas[13]; /* cost of increasing pk_dyn_f from i to i+1 */
X
/*
X * Add up statistics for putting out the given shift count
X */
X
static void
tallyup(int n)
{
X int m;
X
X if (n > 208) {
X ++base;
X n -= 192;
X for (m = 0x100; m != 0 && m < n; m <<= 4) base += 2;
X if (m != 0 && (m = (m - n) / 15) < 13) deltas[m] += 2;
X }
X else if (n > 13) ++deltas[(208 - n) / 15];
X else --deltas[n - 1];
}
X
/*
X * Routines for storing the shift counts
X */
X
static Boolean odd = False;
static byte part;
X
static void
pk_put_nyb(int n)
{
X if (odd) {
X *bitmap_end++ = (part << 4) | n;
X odd = False;
X }
X else {
X part = n;
X odd = True;
X }
}
X
static void
pk_put_long(int n)
{
X if (n >= 16) {
X pk_put_nyb(0);
X pk_put_long(n / 16);
X }
X pk_put_nyb(n % 16);
}
X
static void
pk_put_count(int n)
{
X if (n > pk_dyn_f) {
X if (n > pk_dyn_g)
X pk_put_long(n - pk_dyn_g + 15);
X else {
X pk_put_nyb(pk_dyn_f + (n - pk_dyn_f + 15) / 16);
X pk_put_nyb((n - pk_dyn_f - 1) % 16);
X }
X }
X else pk_put_nyb(n);
}
X
static void
trim_bitmap(void)
{
X byte *p;
X byte mask;
X
X /* clear out garbage bits in bitmap */
X if (width % 8 != 0) {
X mask = ~masks[8 - width % 8];
X for (p = bitmap + bytes_wide - 1; p < bitmap_end; p += bytes_wide)
X *p &= mask;
X }
X
X /*
X * Find the bounding box of the bitmap.
X */
X
X /* trim top */
X skip = 0;
X mask = 0;
X for (;;) {
X if (bitmap >= bitmap_end) { /* if bitmap is empty */
X width = height = hoff = voff = 0;
X return;
X }
X p = bitmap + bytes_wide;
X while (p > bitmap) mask |= *--p;
X if (mask) break;
X ++skip;
X bitmap += bytes_wide;
X }
X height -= skip;
X voff -= skip;
#ifdef DEBUG
X if (skip < 2 || skip > 3)
X printf("Character has %d empty rows at top\n", skip);
#endif
X
X /* trim bottom */
X skip = 0;
X mask = 0;
X for (;;) {
X p = bitmap_end - bytes_wide;
X while (p < bitmap_end) mask |= *p++;
X if (mask) break;
X ++skip;
X bitmap_end -= bytes_wide;
X }
X height -= skip;
#ifdef DEBUG
X if (skip < 2 || skip > 3)
X printf("Character has %d empty rows at bottom\n", skip);
#endif
X
X /* trim right */
X skip = 0;
X --width;
X for (;;) {
X mask = 0;
X for (p = bitmap + width / 8; p < bitmap_end; p += bytes_wide)
X mask |= *p;
X if (mask & (0x80 >> (width % 8))) break;
X --width;
X ++skip;
X }
X ++width;
#ifdef DEBUG
X if (skip < 2 || skip > 3)
X printf("Character has %d empty columns at right\n", skip);
#endif
X
X /* trim left */
X skip = 0;
X for (;;) {
X mask = 0;
X for (p = bitmap + skip / 8; p < bitmap_end; p += bytes_wide)
X mask |= *p;
X if (mask & (0x80 >> (skip % 8))) break;
X ++skip;
X }
X width -= skip;
X hoff -= skip;
#ifdef DEBUG
X if (skip < 2 || skip > 3)
X printf("Character has %d empty columns at left\n", skip);
#endif
X bitmap += skip / 8;
X skip = skip % 8;
}
X
/*
X * Pack the bitmap using the rll method. (Return false if it's better
X * to just pack the bits.)
X */
X
static Boolean
pk_rll_cvt(void)
{
X static int *counts = NULL; /* area for saving bit counts */
X static int maxcounts = 0; /* size of this area */
X unsigned int ncounts; /* max to allow this time */
X int *nextcount; /* next count value */
X int *counts_end; /* pointer to end */
X byte *rowptr;
X byte *p;
X byte mask;
X byte *rowdup; /* last row checked for dup */
X byte paint_switch; /* 0 or 0xff */
X int bits_left; /* bits left in row */
X int cost;
X int i;
X
X /*
X * Allocate space for bit counts.
X */
X
X ncounts = (width * height + 3) / 4;
X if (ncounts > maxcounts) {
X if (counts != NULL) free(counts);
X counts = (int *) xmalloc((ncounts + 2) * sizeof(int),
X "array for bit counts");
X maxcounts = ncounts;
X }
X counts_end = counts + ncounts;
X
X /*
X * Form bit counts and collect statistics
X */
X base = 0;
X bzero(deltas, sizeof(deltas));
X rowdup = NULL; /* last row checked for duplicates */
X p = rowptr = bitmap;
X mask = 0x80 >> skip;
X flag = 0;
X paint_switch = 0;
X if (*p & mask) {
X flag = 8;
X paint_switch = 0xff;
X }
X bits_left = width;
X nextcount = counts;
X while (rowptr < bitmap_end) { /* loop over shift counts */
X int shift_count = bits_left;
X
X for (;;) {
X if (bits_left == 0) {
X if ((p = rowptr += bytes_wide) >= bitmap_end) break;
X mask = 0x80 >> skip;
X bits_left = width;
X shift_count += width;
X }
X if (((*p ^ paint_switch) & mask) != 0) break;
X --bits_left;
X mask >>= 1;
X if (mask == 0) {
X ++p;
X while (*p == paint_switch && bits_left >= 8) {
X ++p;
X bits_left -= 8;
X }
X mask = 0x80;
X }
X }
X if (nextcount >= counts_end) return False;
X shift_count -= bits_left;
X *nextcount++ = shift_count;
X tallyup(shift_count);
X /* check for duplicate rows */
X if (rowptr != rowdup && bits_left != width) {
X byte *p1 = rowptr;
X byte *q = rowptr + bytes_wide;
X int repeat_count;
X
X while (q < bitmap_end && *p1 == *q) ++p1, ++q;
X repeat_count = (p1 - rowptr) / bytes_wide;
X if (repeat_count > 0) {
X *nextcount++ = -repeat_count;
X if (repeat_count == 1) --base;
X else {
X ++base;
X tallyup(repeat_count);
X }
X rowptr += repeat_count * bytes_wide;
X }
X rowdup = rowptr;
X }
X paint_switch = ~paint_switch;
X }
X
#ifdef DEBUG
X /*
X * Dump the bitmap
X */
X
X for (p = bitmap; p < bitmap_end; p += bytes_wide) {
X byte *p1 = p;
X int j;
X
X mask = 0x80 >> skip;
X for (j = 0; j < width; ++j) {
X putchar(*p1 & mask ? '@' : '.');
X if ((mask >>= 1) == 0) mask = 0x80, ++p1;
X }
X putchar('\n');
X }
X putchar('\n');
#endif
X
X /*
X * Determine the best pk_dyn_f
X */
X
X pk_dyn_f = 0;
X cost = base += 2 * (nextcount - counts);
X for (i = 1; i < 14; ++i) {
X base += deltas[i - 1];
X if (base < cost) {
X pk_dyn_f = i;
X cost = base;
X }
X }
X /* last chance to bail out */
X if (cost * 4 > width * height) return False;
X
X /*
X * Pack the bit counts
X */
X
X pk_dyn_g = 208 - 15 * pk_dyn_f;
X flag |= pk_dyn_f << 4;
X bitmap_end = bitmap;
X *nextcount = 0;
X nextcount = counts;
X while (*nextcount != 0) {
X if (*nextcount > 0) pk_put_count(*nextcount);
X else
X if (*nextcount == -1) pk_put_nyb(15);
X else {
X pk_put_nyb(14);
X pk_put_count(-*nextcount);
X }
X ++nextcount;
X }
X if (odd) {
X pk_put_nyb(0);
X ++cost;
X }
X if (cost != 2 * (bitmap_end - bitmap))
X printf("Cost miscalculation: expected %d, got %d\n", cost,
X 2 * (bitmap_end - bitmap));
X pk_len = bitmap_end - bitmap;
X return True;
}
X
static void
pk_bm_cvt(void)
{
X byte *rowptr;
X byte *p;
X int blib1; /* bits left in byte */
X int bits_left; /* bits left in row */
X byte *q;
X int blib2;
X byte nextbyte;
X
X flag = 14 << 4;
X q = bitmap;
X blib2 = 8;
X nextbyte = 0;
X for (rowptr = bitmap; rowptr < bitmap_end; rowptr += bytes_wide) {
X p = rowptr;
X blib1 = 8 - skip;
X bits_left = width;
X if (blib2 != 8) {
X int n;
X
X if (blib1 < blib2) {
X nextbyte |= *p << (blib2 - blib1);
X n = blib1;
X }
X else {
X nextbyte |= *p >> (blib1 - blib2);
X n = blib2;
X }
X blib2 -= n;
X if ((bits_left -= n) < 0) {
X blib2 -= bits_left;
X continue;
X }
X if ((blib1 -= n) == 0) {
X blib1 = 8;
X ++p;
X if (blib2 > 0) {
X nextbyte |= *p >> (8 - blib2);
X blib1 -= blib2;
X bits_left -= blib2;
X if (bits_left < 0) {
X blib2 = -bits_left;
X continue;
X }
X }
X }
X *q++ = nextbyte;
X }
X /* fill up whole (destination) bytes */
X while (bits_left >= 8) {
X nextbyte = *p++ << (8 - blib1);
X *q++ = nextbyte | (*p >> blib1);
X bits_left -= 8;
X }
X /* now do the remainder */
X nextbyte = *p << (8 - blib1);
X if (bits_left > blib1) nextbyte |= p[1] >> blib1;
X blib2 = 8 - bits_left;
X }
X if (blib2 != 8) *q++ = nextbyte;
X pk_len = q - bitmap;
}
X
static void
putshort(short w)
{
X putc(w >> 8, pk_file);
X putc(w, pk_file);
}
X
static void
putmed(long w)
{
X putc(w >> 16, pk_file);
X putc(w >> 8, pk_file);
X putc(w, pk_file);
}
X
static void
putlong(long w)
{
X putc(w >> 24, pk_file);
X putc(w >> 16, pk_file);
X putc(w >> 8, pk_file);
X putc(w, pk_file);
}
X
static void
putglyph(int cc)
{
X static Boolean have_first_line = False;
X static int llx, lly, urx, ury;
X static float char_width;
X static byte *area1 = NULL;
X static unsigned int size1 = 0;
X long dm;
X long tfm_wid;
X byte *p;
X int i;
X
X if (!quiet) {
X int wid;
X static char *s = "";
X
X wid = (cc >= 100) + (cc >= 10) + 4;
X if (col + wid > 80) {
X s = "\n";
X col = 0;
X }
X printf("%s[%d", s, cc);
X fflush(stdout);
X col += wid;
X s = " ";
X }
X if (!have_first_line) {
X expect("#^");
X if (sscanf(line, "#^ %d %d %d %d %d %f\n", &i,
X &llx, &lly, &urx, &ury, &char_width) != 6)
X oops("Cannot scanf first line");
X }
X if (i < cc) oops("Character %d received, %d expected", i, cc);
X if (i > cc) {
X fprintf(stderr, "Character %d is missing.\n", cc);
X have_first_line = True;
X return;
X }
X have_first_line = False;
X hoff = -llx + 2;
X voff = ury + 2 - 1;
X expect("P4\n");
X whitespace();
X width = getint();
X whitespace();
X height = getint();
X (void) getc(data_file);
X if (width != urx - llx + 4 || height != ury - lly + 4)
X oops("Dimensions do not match: %d %d %d %d %d %d",
X llx, lly, urx, ury, width, height);
X bytes_wide = (width + 7) / 8;
X bm_size = bytes_wide * height;
X if (size1 < bm_size) {
X if (area1 != NULL) free(area1);
X area1 = (byte *) xmalloc(bm_size, "original bitmap");
X size1 = bm_size;
X }
X for (p = area1 + (height - 1) * bytes_wide; p >= area1; p -= bytes_wide)
X if (fread(p, 1, bytes_wide, data_file) != bytes_wide)
X oops("Cannot read bitmap of size %u", bm_size);
X bitmap = area1;
X bitmap_end = bitmap + bm_size;
X trim_bitmap();
X if (height == 0 || !pk_rll_cvt()) pk_bm_cvt();
X tfm_wid = tfm_widths[width_index[cc]];
X dm = (long) (char_width + 0.5) - (char_width < -0.5);
X if (pk_len + 8 < 4 * 256 && tfm_wid < (1<<24) &&
X dm >= 0 && dm < 256 && width < 256 && height < 256 &&
X hoff >= -128 && hoff < 128 && voff >= -128 && voff < 128) {
X putc(flag | ((pk_len + 8) >> 8), pk_file);
X putc(pk_len + 8, pk_file);
X putc(cc, pk_file);
X putmed(tfm_wid);
X putc(dm, pk_file);
X putc(width, pk_file);
X putc(height, pk_file);
X putc(hoff, pk_file);
X putc(voff, pk_file);
X } else
X if (pk_len + 13 < 3 * 65536L && tfm_wid < (1<<24) &&
X dm >= 0 && dm < 65536L && width < 65536L && height < 65536L &&
X hoff >= -65536L && hoff < 65536L &&
X voff >= -65536L && voff < 65536L) {
X putc(flag | 4 | ((pk_len + 13) >> 16), pk_file);
X putshort(pk_len + 13);
X putc(cc, pk_file);
X putmed(tfm_wid);
X putshort(dm);
X putshort(width);
X putshort(height);
X putshort(hoff);
X putshort(voff);
X }
X else {
X putc(flag | 7, pk_file);
X putlong(pk_len + 28);
X putlong(cc);
X putlong(tfm_wid);
X putlong((long) (char_width * 65536.0 + 0.5) - (char_width < -0.5));
X putlong(0);
X putlong(width);
X putlong(height);
X putlong(hoff);
X putlong(voff);
X }
X fwrite(bitmap, 1, pk_len, pk_file);
X if (!quiet) {
X putchar(']');
X fflush(stdout);
X }
}
X
int
main(int argc, char **argv)
{
X FILE *config_file;
X FILE *tfm_file;
X float dpi;
X char *fontname;
X int fontlen;
X char *configline;
X unsigned int cflinelen;
X char *p;
X char *PSname = NULL;
X char *specinfo = "";
X char *xfilename;
X char charlist[10*2 + 90*3 + 156*4 + 1];
X char designstr[20];
X char dpistr[20];
X int pid;
X int std_in[2];
X int std_out[2];
X int status;
X int cc;
X int ppp;
X int i;
X
X kpse_set_progname(argv[0]);
X kpse_init_prog("GSFTOPK", 300, "cx", false, "cmr10");
X xputenv_int ("KPATHSEA_DPI", 300);
X
X if (strcmp(argv[1], "-q") == 0) {
X ++argv;
X --argc;
X quiet = True;
X }
X
X if (argc != 3 || (dpi = atof(argv[2])) <= 0.0) {
X fputs("Usage: gsftopk [-q] <font> <dpi>\n", stderr);
X exit(1);
X }
X fontname = argv[1];
X fontlen = strlen(fontname);
X
X if (!quiet) puts(ident);
X
X config_file = fopen(kpse_find_file ("psfonts.map", kpse_dvips_config_format, false), "r");
X if (config_file == NULL) oops("Cannot find file psfonts.map.");
X
X configline = (char *) xmalloc(cflinelen = 80, "Config file line");
X do {
X int len = 0;
X
X if (fgets(configline, cflinelen, config_file) == NULL)
X oops("Cannot find font %s in config file.", fontname);
X for (;;) {
X i = strlen(configline + len);
X
X len += i;
X if (len > 0 && configline[len - 1] == '\n') {
X configline[--len] = '\0';
X break;
X }
X if (len < cflinelen - 1) break;
X configline = xrealloc(configline, cflinelen += 80,
X "config file line");
X fgets(configline + len, cflinelen - len, config_file);
X }
X }
X while (memcmp(configline, fontname, fontlen) != 0
X || (configline[fontlen] != '\0' && !isspace(configline[fontlen])));
X fclose(config_file);
X
X /*
X * Parse the line from the config file.
X */
X for (p = configline + fontlen; *p != '\0'; ++p) {
X if (isspace(*p)) continue;
X if (*p == '<') {
X char *q = ++p;
X char endc;
X FILE *f;
X
X addtodls(" (");
X while (*p != '\0' && !isspace(*p)) ++p;
X endc = *p;
X *p = '\0';
X strcpy(searchpath, kpse_find_file(q, kpse_dvips_header_format, true));
X f = fopen(searchpath, "r");
X if (f == NULL) oops("Cannot find font file %s", q);
X /* search() also sets searchpath */
X addtodls(searchpath);
X addtodls((char) getc(f) == '\200' ? ") brun" : ") run");
X fclose(f);
X if (endc == '\0') break;
X continue;
X }
X else if (*p == '"') {
X char *q;
X
X specinfo = ++p;
X q = strchr(p, '"');
X if (q == NULL) break;
X p = q;
X }
X else {
X PSname = p;
X while (*p != '\0' && !isspace(*p)) ++p;
X if (*p == '\0') break;
X }
X *p = '\0';
X }
X
X /*
X * Start up GhostScript.
X */
X
X strcpy(searchpath, kpse_find_file("render.ps", kpse_dvips_header_format, true));
X tfm_file = fopen(searchpath, "r");
X if (tfm_file == NULL)
X oops("Cannot find PS driver file \"render.ps\".");
X fclose(tfm_file);
X
X sprintf(dpistr, "%f", dpi);
X
X if (pipe(std_in) != 0 || pipe(std_out) != 0) {
X perror("pipe");
X return 1;
X }
X
X fflush(stderr); /* to avoid double flushing */
X pid = vfork();
X if (pid == 0) {
X close(std_in[1]);
X dup2(std_in[0], 0);
X close(std_in[0]);
X close(std_out[0]);
X dup2(std_out[1], 1);
X close(std_out[1]);
X execlp(GS, "gs", "-DNODISPLAY", "-q", "--",
X /* render.ps */ searchpath,
X PSname != NULL ? PSname : fontname,
X dlstring != NULL ? dlstring : "", specinfo, dpistr, NULL);
X perror("gs");
X exit(1);
X }
X if (pid == -1) {
X perror("fork");
X exit(1);
X }
X
X /*
X * Open and read the tfm file. If this takes a while, at least
X * it can overlap with the startup of GhostScript.
X */
X
X fontlen = strlen(fontname);
X xfilename = xmalloc(fontlen + 10, "name of tfm/pk file");
X strcpy(xfilename, fontname);
X /* strcpy(xfilename + fontlen, ".tfm"); */
X strcpy(searchpath, kpse_find_file(xfilename, kpse_tfm_format, true));
X tfm_file = fopen(searchpath, "r");
X if (tfm_file == NULL) oops("Cannot find tfm file.");
X for (i = 0; i < 12; ++i) {
X int j;
X
X j = (int) ((byte) getc(tfm_file)) << 8;
X tfm_lengths[i] = j | (int) ((byte) getc(tfm_file));
X }
X checksum = getlong(tfm_file);
X design = getlong(tfm_file);
X fseek(tfm_file, 4 * (lh + 6), 0);
X p = charlist;
X for (cc = bc; cc <= ec; ++cc) {
X width_index[cc] = (byte) getc(tfm_file);
X if (width_index[cc] != 0) {
X sprintf(p, "%d ", cc);
X p += strlen(p);
X }
X (void) getc(tfm_file);
X (void) getc(tfm_file);
X (void) getc(tfm_file);
X }
X for (i = 0; i < nw; ++i) tfm_widths[i] = getlong(tfm_file);
X fclose(tfm_file);
X p[-1] = '\n';
X
X /* write the design size and character list to the file */
X sprintf(designstr, "%f\n", (float) design / (1 << 20));
X write(std_in[1], designstr, strlen(designstr));
X write(std_in[1], charlist, p - charlist);
X close(std_in[1]);
X
/*
X * Read the output from GhostScript.
X */
X
X if ((data_file = fdopen(std_out[0], "r")) == NULL) {
X perror("GS_out");
X exit(1);
X }
X
/*
X * Create pk file and write preamble.
X */
X
X fflush(stdout);
X sprintf(xfilename + fontlen, ".%dpk", (int) (dpi + 0.5));
X if ((pk_file = fopen(xfilename, "w")) == NULL) {
X perror(xfilename);
X exit(1);
X }
X putc(PK_PRE, pk_file);
X putc(PK_ID, pk_file);
X i = strlen(ident);
X putc(i, pk_file);
X fwrite(ident, 1, i, pk_file);
X putlong(design);
X putlong(checksum);
X ppp = dpi / 72.27 * 65536.0 + 0.5;
X putlong(ppp); /* hppp */
X putlong(ppp); /* vppp */
X
/*
X * Write the actual characters.
X */
X
X for (cc = bc; cc <= ec; ++cc)
X if (width_index[cc] != 0)
X putglyph(cc);
X fclose(data_file);
X
X if (wait(&status) == -1) {
X perror("wait");
X exit(1);
X }
X if (status != 0)
X if (status & 0377)
X oops("Call to gs stopped by signal %d", status & 0177);
X else oops("Call to gs returned nonzero status %d", status >> 8);
X
X putc(PK_POST, pk_file);
X while (ftell(pk_file) % 4 != 0) putc(PK_NOP, pk_file);
X fclose(pk_file);
X if (!quiet) putchar('\n');
X return 0;
}
SHAR_EOF
$shar_touch -am 1215233994 'gsftopk/gsftopk.c' &&
chmod 0644 'gsftopk/gsftopk.c' ||
echo 'restore of gsftopk/gsftopk.c failed'
shar_count="`wc -c < 'gsftopk/gsftopk.c'`"
test 23315 -eq "$shar_count" ||
echo "gsftopk/gsftopk.c: original size 23315, current size $shar_count"
fi
# ============= gsftopk/render.ps ==============
if test -f 'gsftopk/render.ps' && test X"$1" != X"-c"; then
echo 'x - skipping gsftopk/render.ps (file already exists)'
else
echo 'x - extracting gsftopk/render.ps (text)'
sed 's/^X//' << 'SHAR_EOF' > 'gsftopk/render.ps' &&
% render.ps - write font bitmaps and metric information to standard output.
% Version 1.6.
X
% Copyright (c) 1994 Paul Vojta. All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions
% are met:
% 1. Redistributions of source code must retain the above copyright
% notice, this list of conditions and the following disclaimer.
% 2. Redistributions in binary form must reproduce the above copyright
% notice, this list of conditions and the following disclaimer in the
% documentation and/or other materials provided with the distribution.
%
% THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
% ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
% FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
% OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
% HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
% OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
% SUCH DAMAGE.
X
%%%
% Usage: gs -DNODISPLAY -q -- render.ps fontname dlstring specinfo dpi
% Then, it will read standard input to get:
% pointsize
% charset
X
% Example:
% % gs -DNODISPLAY -q -- render.ps Helvetica "(phvr.gsf) run" \
% > ".5 ExtendFont" 300
% GS> 10
% GS> 97 98 99
X
X
%%
%
% Define some routines first
X
% (string) fatal -
% Print string to stderr and quit.
X
/fatal
X {
X (render.ps: ) exch concatstrings
X .stderr exch writestring .stderr flushfile 1 .quit
X }
bind def
X
% (exec) getbbox -
% Get bounding box of the executable object.
% It also makes a device just a few pixels larger on each side.
X
/getbbox
X {
X gsave
X nulldevice
X erasepage
X newpath
X exec
X pathbbox % returns llx lly urx ury
X /char-ury exch ceiling cvi def
X /char-urx exch ceiling cvi def
X /char-lly exch floor cvi def
X /char-llx exch floor cvi def
X grestore
X
X matrix
X char-urx char-llx sub 4 add % width
X char-ury char-lly sub 4 add % height
X <ff 00>
X makeimagedevice setdevice
X 2 char-llx sub 2 char-lly sub translate
X }
bind def
X
%%
%
% These may be called by the "specinfo" string.
X
/usefontbbox false def
X
% These do things to a transformation array; called by entries in psfonts.map.
%
/ObliqueSlant { dup sin exch cos div neg } bind def
/SlantFont { font-size mul add } def
/ExtendFont { 3 -1 roll mul exch } def
/ReEncodeFont { TargetFont dup length dict /newdict exch def
X {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall
X newdict exch /Encoding exch put
X /OurFont newdict definefont /TargetFont exch def} def
X
X
%%
%
% Main program begins now. Just interpret it.
X
% Get arguments.
X
shellarguments not
X {
X (You must provide arguments to the shell!\n) fatal
X }
if
X
/dpi exch cvr def
/specinfo exch def
/dlstring exch def
/fontname exch def
X
% Open the font.
X
dlstring () ne
X {
X dlstring cvx exec
X Fontmap fontname cvn known
X FontDirectory fontname cvn known or
X }
X {
X Fontmap fontname cvn known
X }
ifelse
X
not
X {
X (font ) fontname concatstrings ( is not defined.\n) concatstrings
X fatal
X }
if
X
% Get arguments from stdin. Just leave the character list on the stack.
X
/font-size
X .stdin 20 string readline pop cvr % get pointsize
X 72.27 div dpi mul % let's work in (TeX) points
def
[ .stdin 1024 string readline pop cvx exec ] % character list
X
% Define the font, and make it current.
X
/TargetFont fontname cvlit findfont def
X TargetFont
X [ font-size 0 specinfo cvx exec 0 exch font-size 0 0 ]
makefont setfont
X
% If the font's bounding box is zero, then do not use it.
X
usefontbbox
X { currentfont /FontBBox get
X true exch {0 eq and} forall
X {/usefontbbox false def}if
X }
if
X
% If we are to use the font's bounding box, then get it and transform it.
X
usefontbbox
X {
X { currentfont /FontBBox get
X dup dup 0 get exch 1 get currentfont /FontMatrix get transform moveto
X dup dup 0 get exch 3 get currentfont /FontMatrix get transform lineto
X dup dup 2 get exch 1 get currentfont /FontMatrix get transform lineto
X dup 2 get exch 3 get currentfont /FontMatrix get transform lineto
X }
X getbbox
X }
if
X
% Begin loop over characters.
X
X {
X /charno exch def
X /charstring 1 string dup 0 charno put def
X /charwidth charstring stringwidth pop def
X
X % Get the character's bounding box. This also makes the device.
X usefontbbox not
X {
X { 0 0 moveto charstring true charpath } getbbox
X }
X if
X
X % Print the metric info.
X (#^ ) print
X charno =string cvs print
X ( ) print
X char-llx =string cvs print
X ( ) print
X char-lly =string cvs print
X ( ) print
X char-urx =string cvs print
X ( ) print
X char-ury =string cvs print
X ( ) print
X charwidth =string cvs print
X (\n) print
X
X % Now write the bitmap.
X erasepage 0 0 moveto
X charstring show
X .stdout currentdevice writeppmfile
X }
forall
SHAR_EOF
$shar_touch -am 0515192194 'gsftopk/render.ps' &&
chmod 0644 'gsftopk/render.ps' ||
echo 'restore of gsftopk/render.ps failed'
shar_count="`wc -c < 'gsftopk/render.ps'`"
test 5319 -eq "$shar_count" ||
echo "gsftopk/render.ps: original size 5319, current size $shar_count"
fi
exit 0